<template>
	<div>
		<!-- 头部的描述和导航栏 -->
		<HeaderView :seller="seller"></HeaderView>

	</div>
</template>

<script>
	import HeaderView from '../components/HeaderView.vue'
	export default {
		data() {
			return {
				goods:[],
				seller:{}
			}
		},
		created(){
			this.getGoods()
		},
		methods: {
			getGoods() {
				// 通过axios发送请求
				this.$axios({
					methods: 'GET',
					url: '../../data.json'
				}).then(res => {
					// 如果请求成功，走这里
					console.log(res)
					this.goods = res.data.goods
					this.seller = res.data.seller
				})
			}

		},
		components: {
			HeaderView
		}
	}
</script>

<style>
</style>
